<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2019/1/8 0008
  Time: 19:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<form action="${pageContext.request.contextPath}/users/list">
     <table align="center">
         <tr>
             <td><p font-size="20">商务会员管理系统</p></td>
         </tr>
     </table>
    <table align="center">
        <tr>
            <td>用户名:${uname} &nbsp;&nbsp;用户类型:管理员&nbsp;&nbsp;<a href="${pageContext.request.contextPath}/">退出</a></td>
        </tr><br/>
        <tr>
            <td> <a href="${pageContext.request.contextPath}/">修改密码</a>&nbsp;&nbsp;<a href="${pageContext.request.contextPath}/">查看所有会员</a></td>
        </tr>
    </table>
    <table  border=1 align="center">
    <tr>
        <td align="center"  colspan="5">会员管理</td>
    </tr>
    <tr>
        <td align="center"  colspan="5">用户名:<input type="text" name="name" value="${users.name}"/>&nbsp;
            <input type="submit" value="查询"/><input type="submit" value="查找"/></td>
    </tr>
</table>
</form>
<table align="center">
    <tr  bgcolor="#808080">
        <td align="center">序号</td>
        <td align="center">用户名</td>
        <td align="center">用户类别</td>
        <td align="center">用户状态</td>
        <td align="center">最后修改时间</td>
    </tr>

    <c:forEach items="${list}" var="li">
        <tr align="center">
                <%--<td><input  type="checkbox" name="cbItem"  VALUE="${li.id}"/>${li.id}</td>--%>
            <td>${li.id}</td>
            <td>${li.name}</td>
            <td>${li.typename}</td>
            <td>${li.status==1?"正常":"冻结"}</td>
            <td><fmt:formatDate value="${li.lastModifyTime}" pattern="yyyy-MM-dd"/></td>
        </tr>
    </c:forEach>
</table>
    <p align="center">共${pageTool.totalRecordCount}条数据，当前第${pageTool.currPageNo}/${pageTool.pageCount}页，每页${pageTool.pageSize}条，
        <a href="${pageContext.request.contextPath}/users/list?name=${users.name}&currPageNo=1">首页</a>

        <a href="${pageContext.request.contextPath}/users/list?name=${users.name}&currPageNo=${pageTool.currPageNo-1}">上一页</a>

        <c:forEach var="prePage" items="${prePages}">
            <a href="${pageContext.request.contextPath}/users/list?name=${users.name}&currPageNo=${prePage}">${prePage}</a>
        </c:forEach>

        <b>${pageTool.currPageNo}</b>

        <c:forEach var="nextPage" items="${nextPages}">
            <a href="${pageContext.request.contextPath}/users/list?name=${users.name}&currPageNo=${nextPage}">${nextPage}</a>
        </c:forEach>

        <a href="${pageContext.request.contextPath}/users/list?name=${users.name}&currPageNo=${pageTool.currPageNo+1}">下一页</a>

        <a href="${pageContext.request.contextPath}/users/list?name=${users.name}&currPageNo=${pageTool.pageCount}">末页</a>
    </p>

</body>
</html>
